home *** CD-ROM | disk | FTP | other *** search
- /* Title Splitz */
- /* Author Paul Clough */
- /* version 1.1 */
- /* date 19/4/96 */
- /* lastdate 15/9/97 easy install */
- /* Email ca5pcl@isis.sunderland.ac.uk */
-
- /* Full Path and filename as argrument */
-
- Parse arg SourceFileName DirectoryName
-
- /* Exit the program if blank argruments */
-
- If arg(1)='' then exit()
-
- /* information on the system program run in */
-
- PARSE SOURCE CallType ResStr TheCall StorePath FileExt HostSystem
-
- /* String to call "Splitz" as same directory as SuperSplitz.rexx */
-
- StorePath='"'left(StorePath,lastpos('/',StorePath))'Splitz"'
-
- /* Create DeFilename from SourceFileName */
-
- IF LastPos('/',SourceFileName)>0 then
- DeFileName=substr(SourceFileName,(1+lastpos('/',SourceFileName)),(length(SourceFileName)-lastpos('/',SourceFileName)))
- Else
- DeFileName=substr(SourceFileName,(1+lastpos(':',SourceFileName)),(length(SourceFileName)-lastpos(':',SourceFileName)))
-
- /* This set up FileName Max length */
-
- If length(DeFileName)>16 then DeFileName=substr(DeFileName,1,16)
-
- /* Add Speech mark for Filename with spaces in them */
-
- SourceFileName='"'SourceFileName'"'
-
- /* Find Out the Disk Size capture */
-
- SizeOfFile=840000
-
- /* Set up des directory */
- If DirectoryName>'' then DirectoryName=substr(DirectoryName,1,length(DirectoryName)-1)
- DirectoryName='"'DirectoryName || DeFileName'"'
-
- /* Address DOS commands */
-
- address command
-
- /* Execute the splitz program with parament */
-
- StorePath SourceFileName DirectoryName SizeOfFile
-
- say('This real name is 'SourceFileName' split filename is 'DeFileName)